// 传入cookie获取token值

export default (cookie) => {
    if (cookie) {
        let reg = /token=[\s\S]*/;
        let cookieArr = cookie.match(reg);
        let cookieSplitArr = cookieArr[0].split(';');
        let token = cookieSplitArr[0].split('=')[1];
        return token;
    }
    return null;
}

